profiler: Make profiler-is-running a macro
authorAlexander Larsson <alexl@redhat.com>
Wed, 12 Feb 2020 10:05:01 +0000 (11:05 +0100)
committerAlexander Larsson <alexl@redhat.com>
Wed, 12 Feb 2020 10:05:01 +0000 (11:05 +0100)
commit01d5ad2056f9c896246219eb04ca1ae807a45768
treeaecc056b7dd2c2e0911c223fada8ca4e06dfceb3
parentcc643df88b541b7505885ecff02c8576decf6bbd
profiler: Make profiler-is-running a macro

When we use if (GDK_PROFILER_IS_RUNNING) this means we get an
inlined if (FALSE) when the compiler support is not compiled in, which
gets rid of all the related code completely.

We also expand to  G_UNLIKELY(gdk_profiler_is_running ()) in the supported
case which might cause somewhat better code generation.
18 files changed:
gdk/broadway/gdksurface-broadway.c
gdk/gdkdrawcontext.c
gdk/gdkframeclock.c
gdk/gdkframeclockidle.c
gdk/gdkprofilerprivate.h
gdk/gdksurface.c
gdk/wayland/gdkdisplay-wayland.c
gdk/wayland/gdksurface-wayland.c
gdk/x11/gdkdisplay-x11.c
gsk/gl/gskglrenderer.c
gsk/vulkan/gskvulkanrenderer.c
gtk/gtkapplication.c
gtk/gtkcssnode.c
gtk/gtkcssprovider.c
gtk/gtkemojichooser.c
gtk/gtkicontheme.c
gtk/gtkwidget.c
gtk/gtkwindow.c